//
// Created by linfe on 2023/6/10.
//

#ifndef INSCUBE_RECEIVER_INSCUBE_RECEIVER_H
#define INSCUBE_RECEIVER_INSCUBE_RECEIVER_H

#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/string.hpp"
#include "SerialPortHandler.h"
#include <QSerialPortInfo>
#include "QThread"
#include "glog/logging.h"
#include "QObject"

class InsCubePublisher : public rclcpp::Node {

public:
    InsCubePublisher();

    ~InsCubePublisher() override;


private :

    static void OnCommSyncMsg(uint32_t msg_id, uint8_t *msg_data) ;

private:
    static rclcpp::Publisher<std_msgs::msg::String>::SharedPtr publisher_;
    static size_t count_;
     SerialPortHandler handler;
     QThread *th_serial;
};

#endif //INSCUBE_RECEIVER_INSCUBE_RECEIVER_H
